package com.atxiaodei.nio.nioday01;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.io.Serializable;
import java.util.function.Predicate;

/**
 * @author wangmeng
 * @date 2020/9/12
 **/
@Data
@AllArgsConstructor
public class StreamTestVo implements Serializable {
    private static final long serialVersionUID = 4556976759677949334L;
    private Integer id;
    private Integer age;   //年龄
    private String gender;  //性别
    private String firstName;
    private String lastName;

    public static Predicate<StreamTestVo> ageGreaterThan70 = x -> x.getAge() >70;
    public static Predicate<StreamTestVo> genderM = x -> x.getGender().equals("M");
}
